﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace MazeNet.Communication
{
    public class Move
    {
        #region Properties
        public boardType Board { get { return _mBoard; } }
        public cardType ShiftCard { get { return _mCard; } }
        public positionType ShiftPosition { get { return _mShiftPos; } }
        #endregion

        #region Member
        private boardType _mBoard;
        private cardType _mCard;
        private positionType _mShiftPos; 
        #endregion

        public Move(boardType _uBoard, cardType _uCard, Point _uShiftPos)
        {
            _mBoard = _uBoard;
            _mCard = _uCard;
            _mShiftPos = new positionType();
            _mShiftPos.col = _uShiftPos.X;
            _mShiftPos.row = _uShiftPos.Y;
        }

        public MoveMessageType GenerateMoveMessage(Point _uPlayerPos)
        {
            MoveMessageType _lRet = new MoveMessageType();
            _lRet.newPinPos = new positionType();
            _lRet.newPinPos.col = _uPlayerPos.X;
            _lRet.newPinPos.row = _uPlayerPos.Y;
            _lRet.shiftCard = _mCard;
            _lRet.shiftPosition = _mShiftPos;
            return _lRet;
        }
    }
}
